package com.caoyuqi.picture.service;

import com.caoyuqi.picture.mapper.CrudMapper;
import com.caoyuqi.picture.mapper.LoginMapper;
import com.caoyuqi.picture.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CrudService {
    @Autowired
    LoginMapper loginMapper;
    @Autowired
    CrudMapper crudmapper;
    public void InsertInToUser(String username,String pwd,String admin)
    {
        crudmapper.InsertInToUser(username, pwd, admin);
    }
    public User sfcz(String username)
    {
        return crudmapper.SelectByUsername(username);
    }
    public void DeleteUser(String user)
    {
        crudmapper.DeleteUser(user);
    }
    public String queryAdmin(String username)
    {
        return loginMapper.queryAdmin(username);
    }
}
